]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
slider: Flip horizontal scroll coordinates in RTL languages
authorCarlos Garnacho <carlosg@gnome.org>
Mon, 18 Aug 2025 16:59:49 +0000 (18:59 +0200)
committerFlorian Müllner <fmuellner@gnome.org>
Fri, 29 Aug 2025 22:55:47 +0000 (00:55 +0200)
In those languages, the horizontal axis still grows positively
towards the right, which means we need to invert left and right
as they come from scroll events, in order to have the expected
effect.

Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/3842>

js/ui/slider.js

index ebeb0d4f30870f67d75eec59ea30c9851f683c18..2cf5f145b44af2d7b07c53d2f6a5dc9448426a93 100644 (file)
@@ -177,6 +177,8 @@ export const Slider = GObject.registerClass({
             // Match physical direction
             if (event.get_scroll_flags() & Clutter.ScrollFlags.INVERTED)
                 nSteps *= -1;
+            if (this.get_text_direction() === Clutter.TextDirection.RTL)
+                nSteps *= -1;
         }
 
         this.step(nSteps);